﻿using System;
using System.Windows.Threading;

namespace MadMediaManager.WPFSupport.Interfaces.Services.Threading
{
    public interface IDispatcherOperation
    {
        IDispatcher Dispatcher { get; }
        DispatcherPriority Priority { get; set; }
        DispatcherOperationStatus Status { get; }
        object Result { get; }

        DispatcherOperationStatus Wait();
        DispatcherOperationStatus Wait(TimeSpan timeout);
        bool Abort();

        event EventHandler Aborted;
        event EventHandler Completed;
    }
}